<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <script>
        // window对象是属于BOM
        // window.alert("弹出框");
        // encodeURI()
        /*
            uri
            url
         */
        let uri = encodeURI("http://www.leo.com/你好.html#start");
        console.log(uri);

        console.log(decodeURI("http://127.0.0.1:8848/%E6%B2%B3%E6%B1%A0%E5%AD%A6%E9%99%A2-%E6%8A%80%E7%A7%91/0906/01-%E7%BB%BC%E5%90%88%E7%BB%83%E4%B9%A0%E4%B8%80.html"))
        console.log(encodeURIComponent("http://www.leo.com/你好.html#start"))

        let msg = "hello world";
        console.log(msg);
        // console.log("console.log(msg)")
        eval("console.log(msg)"); // "hello world"

        // 定时器
        let st1 = window.setTimeout(function (a, b, c) {
            console.log("setTimeout")
            console.log(a, b, c);
            console.log(arguments);
            console.log("这是在2秒之后才会执行");
        }, 2000, 1, 2, 3);
        clearTimeout(st1);
        // 循环定时执行
        let si1 = setInterval(function (a, b, c) {
            console.log("setInterval")
            console.log(a, b, c);
            console.log(arguments);
            console.log("这是在1秒之后才会执行");
        }, 1000, 1, 2, 3)
        setTimeout(function (){
            clearInterval(si1);
        }, 3000);
    </script>
</body>
</html>